/*
 * drv_gpio.h
 *
 *  Created on: Nov 30, 2022
 *      Author: hongwei_zhu
 */

#ifndef USER_DRV_GPIO_H_
#define USER_DRV_GPIO_H_
#include "stdint.h"
#include "ch32v20x_gpio.h"
#include "ch32v20x.h"
#include "CONFIG.h"
struct gpio_type{
    void (*init)(uint32_t);
    void (*set)(void);
    void (*reset)(void);
    uint8_t (*read)(void);
};
extern struct gpio_type pb15;
extern struct gpio_type pb14;
extern struct gpio_type pb13;
extern struct gpio_type pb12;
extern struct gpio_type pb11;
extern struct gpio_type pb8;
extern struct gpio_type pb9;
extern struct gpio_type pb7;
extern struct gpio_type pb6;
extern struct gpio_type pb5;
extern struct gpio_type pb4;
extern struct gpio_type pb3;
extern struct gpio_type pb1;
extern struct gpio_type pb0;

extern struct gpio_type pa0;
extern struct gpio_type pa1;
extern struct gpio_type pa2;
extern struct gpio_type pa3;
extern struct gpio_type pa4;
extern struct gpio_type pa5;
extern struct gpio_type pa6;
extern struct gpio_type pa7;
extern struct gpio_type pa8;
extern struct gpio_type pa9;
extern struct gpio_type pa10;
extern struct gpio_type pa11;
extern struct gpio_type pa12;
extern struct gpio_type pa13;
extern struct gpio_type pa15;
extern struct gpio_type pa14;

extern struct gpio_type pc0;
extern struct gpio_type pc1;
extern struct gpio_type pc2;
extern struct gpio_type pc3;
extern struct gpio_type pc4;
extern struct gpio_type pc5;
extern struct gpio_type pc6;
extern struct gpio_type pc7;
extern struct gpio_type pc8;
extern struct gpio_type pc9;
extern struct gpio_type pc10;
extern struct gpio_type pc11;
extern struct gpio_type pc12;
extern struct gpio_type pc13;
extern struct gpio_type pc14;
extern struct gpio_type pc15;

extern struct gpio_type pd2;
extern struct gpio_type pd3;
extern struct gpio_type pd4;
extern struct gpio_type pd6;
#endif /* USER_DRV_GPIO_H_ */
